package com.nowcoder.community.dao;

import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

/**
 * @author AnYang
 * @Description 测试当有多个实现类实现同一个接口bean工厂该怎么办
 * @Version 1.0.0
 * @Date 2024/1/12
 */

@Repository
//bean工厂会优先选则该注解的类
@Primary
public class AlphaDaoMybatis implements AlphaDao{
    @Override
    public String select() {
        return "Mybatis";
    }

    @Override
    public String find() {
        return "data";
    }
}
